<template>
  <el-dialog :title="dataList.test" :visible.sync="dataList.type">
    <el-form :model="dataList">
      <el-form-item label="第几天" :label-width="formLabelWidth">
        <el-input v-model="dataList.day" autocomplete="off"></el-input>
      </el-form-item>

      <el-form-item label="获取积分" :label-width="formLabelWidth">
        <el-input v-model="dataList.sign_num" autocomplete="off"></el-input>
      </el-form-item>

      <el-form-item label="排序" :label-width="formLabelWidth">
        <el-input v-model="dataList.sort" autocomplete="off"></el-input>
      </el-form-item>

      <el-form-item label="状态" :label-width="formLabelWidth">
        <el-radio-group v-model="dataList.status">
          <el-radio :label="1">显示</el-radio>
          <el-radio :label="0">隐藏</el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dataList = false">取 消</el-button>
      <el-button type="primary" @click="sure">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: ["dataList"],
  data() {
    return {
      formLabelWidth: "120px",
    };
  },

  methods: {
      sure(){
          this.dataList.type=false
          console.log(this.dataList);
          if(this.dataList.id==""){
              this.$emit("addList",this.dataList)
          }else{
              this.$emit("editList",this.dataList)
          }
      }
  },
};
</script>
<style lang='less' scoped>
</style>